import { Prop, getModelForClass } from '@typegoose/typegoose';


export class Visite {

    @Prop({ require: true, type: Number })
    year
    @Prop({ required: true, type: Number })
    month
    @Prop({ required: true, type: Number })
    week
    @Prop({ type: Number, default: 0 })
    review
    @Prop({ type: Number, default: 0 })
    usercount
}


export const VisiteModel = getModelForClass(Visite, {
    //为模型取名,默认为类的名字+s
    schemaOptions: { collection: 'visite' },
})